#include <iostream>
#include "Parser.h"
using namespace std;

void Parser::program(char* first) {
	if (first == "CREATE") {
		CreateTable oCreateTable;
		command = &oCreateTable;
		nextToken();
	}
	else if (first == "UPDATE") {
		UpdateTable oUpdate;
		command = &oUpdate;
	}
	else if (first == "INSERT") {
		InsertInto oInsert;
		command = &oInsert;
	}
	else if (first == "DELETE") {
		DeleteFrom oDeleteFrom;
		command = &oDeleteFrom;
	}
	else {
		Query oQuery;
		command = &oQuery;
	}
}

void Parser::nextToken() {
	nCurrentTokenIndex += 1;
	currentToken = vTokens[nCurrentTokenIndex];
}

void Parser::createCommand() {
	if (currentToken == "TABLE") {
		nextToken();
		relationName();
	}
}

void Parser::relationName() {
}